Configure QoS Profile

You can use the efa policy qos profile command to create, delete, update, bind, unbind, and list QoS profile.

About this task

Follow this procedure to configure QoS profile on a fabric.

Procedure

  1. Create the maps.
    1. Use maps for the association of DSCP or PCP values to TC and the converse mapping. Maps associate a header value or defined TC to another value. The map types referenced by a QoS Profile are pcp-tc-map, dscp-tc-map, tc-pcp-map, and tc-dscp-map. The first step is to define the maps to which the profile will be referenced.
      Run the following command to create one of each map. The command for creating the four map types are similar and are of the form “from value” -> “to value”. For example, pcp-to-tc type takes a “pcp” value and maps it to a “TC + DP” combination.
      efa policy qos map create –-name mapName  –-type pcp-to-tc –-rule “pcp[0],tc[7],dp[1]” --rule “pcp[1],tc[6]” --rule “pcp[2-5]tc[5],dp[2]”
      
      efa policy qos map create --name tc2pcp --type tc-pcp-map --rule "pcp[5],tc[2]" --rule "pcp[2],tc[3],dp[1]"
      
      efa policy qos map create --name dscp2tc --type dscp-tc-map --rule "dscp[5],tc[2]" --rule "dscp[2],tc[3],dp[1]"
      
      efa policy qos map create --name tc2dscp --type tc-dscp-map --rule "dscp[63],tc[0],dp[1]" --rule "dscp[0],tc[1],dp[0]"
    2. Once a “rule” is added to a map to change the behavior of the rule, use the “update” version of the command. For example, one of the pcp-to-tc rule maps pcp 0 to TC 7 DP1. If it is now desired to map pcp 0 to TC 6 DP 1, run the following command:
      efa policy qos map update –-name mapName  –-type pcp-to-tc –-rule “pcp[0],tc[6],dp[1]”
    3. If the desired mapping is no longer desired and to set the mapping of pcp 0 back to the default setting, delete the existing rule by running the following command:
      efa policy qos map delete –-name mapName  –-type pcp-to-tc –-rule “pcp[0]”
  2. Once the maps are created, create a QoS Profile that reference to the existing maps. Run the following command to create a profile:
    efa policy qos profile create --name qf1 --trust dscp --pcp-tc pcp2tc --dscp-tc dscp2tc --tc-pcp tc2pcp --tc-dscp tc2dscp

    This command contains maps to be used on an interface for different mappings or mutations and if manipulation of DSCP on Layer 2 interfaces are allowed. For more details on how the profile is applied to a device, see step 4.

  3. Run the following command to apply the QoS profile to the fabric:
    QoS Profiles are applied at the fabric level and will be applied to all interfaces of all devices that belong to the specified fabric.
    efa policy qos profile bind --name qf1 --fabric MyFabric
  4. To delete QoS profile after it is applied, run the following unbind command:

    The delete command of QoS profile removes (or defaults) specified parameter from an existing profile. If no parameter is specified, the QoS profile will be deleted. This change will be made to the XCO database. It might take effect on devices if the configuration is applied on the devices.

    efa policy qos profile unbind --name qf1 --fabric MyFabric
    • The following CLI removes the specific rules, for example, the DSCP to TC map associated with the profile:
      % efa policy qos profile delete –-name fabricProfile1 –-dscp-tc
    • The following CLI deletes the entire profile, fabricProfile1:
      % efa policy qos profile delete –-name fabricProfile1
  5. To list QoS profiles, run the efa policy qos profile list command.

    If you provide an IP option, the app state of the configuration will be displayed for the given devices.

    • The following CLI lists the configuration details of QoS profile qosProfile1:
      % efa policy qos profile list –-name qosProfile1 
       
      QoS Profile details: 
      Name: qosProfile1 
      Pcp->TC: Map1
    • The following CLI lists configuration details of QoS profile qosProfile10 where multiple user defined maps and trust are specified as ‘auto‘:
      % efa policy qos profile list –-name qosProfile10 
       
      QoS Profile details: 
      Name: qosProfile10 
      Trust: auto 
      Pcp->TC: Map1 
      Dscp->TC: Map2 
      TC->Dscp: Map3
    • The following CLI lists configuration details of QoS profile qosProfile10 when you provide a range of devices (Binding or app states of given QoS profile on multiple devices):
      % efa policy qos profile list –-name qosProfile10 –-ip 10.20.245.1-3 
       
      QoS Profile details: 
      Name: qosProfile10 
      Trust: auto 
      Pcp->TC: Map1 
      Dscp->TC: Map2 
      TC->Dscp: Map3 
       
      Device Bindings: 
      +--------------+---------------+--------------+ 
      |  Name        |  IP Address   |   App State  | 
      +--------------+---------------+--------------+ 
      | qosProfile10 | 10.20.245.1   |  cfg-in-sync | 
      +--------------+---------------+--------------+ 
      |              | 10.20.245.2   |  cfg-in-sync | 
      +--------------+---------------+--------------+ 
      |              | 10.20.245.3   |  cfg-in-sync | 
      +--------------+---------------+--------------+ 
    • The following CLI lists configuration details of QoS profile qosProfile10 when you provide a device (Binding or app states of given QoS profile on a single device). This command displays the app state of QoS Profile on all interfaces of the device:
      % efa policy qos profile list –-name qosProfile10 –-ip 10.20.245.1 
       
      QoS Profile details: 
      Name: qosProfile10 
      Trust: auto 
      Pcp->TC: Map1 
      Dscp->TC: Map2 
      TC->Dscp: Map3 
      Device Bindings: 
      +--------------+---------------+--------------+--------------+ 
      |  Name        |  IP Address   |   Interface  |   App State  | 
      +--------------+---------------+--------------+--------------+ 
      | qosProfile10 | 10.20.245.1   | Ethernet 0/1 |  cfg-in-sync | 
      +--------------+---------------+--------------+--------------+ 
      |              |               | Ethernet 0/2 |  cfg-in-sync | 
      +--------------+---------------+--------------+--------------+ 
      |              |               | Ethernet 0/3 |  cfg-in-sync | 
      +--------------+---------------+--------------+--------------+ 
      |              |               | Ethernet 0/4 |  cfg-in-sync | 
      +--------------+---------------+--------------+--------------+
    • The following CLI lists configuration details of QoS profile qosProfile10 when you provide a device and interface. This command displays the app state of the QoS profile parameters on a given interface of the specified device:
      % efa policy qos profile list –-name qosProfile10 –-ip 10.20.245.1 --interface “Ethernet 0/3” 
       
      QoS Profile details: 
      Name: qosProfile10 
      Trust: auto 
      Pcp->TC: Map1 
      Dscp->TC: Map2 
      TC->Dscp: Map3 
       
      Device Bindings: 
      +--------------+---------------+--------------+----------+--------------+ 
      |  Name        |  IP Address   |  Interface   | Parameter|   App State  | 
      +--------------+---------------+--------------+----------+--------------+ 
      | qosProfile10 | 10.20.245.1   | Ethernet 0/3 |  Trust   |  cfg-in-sync | 
      +--------------+---------------+--------------+----------+--------------+ 
      |              |               |              |  Pcp->TC |  cfg-in-sync | 
      +--------------+---------------+--------------+----------+--------------+ 
      |              |               |              | Dscp->TC |  cfg-in-sync | 
      +--------------+---------------+--------------+----------+--------------+ 
      |              |               |              | TC->Dscp |  cfg-in-sync | 
      +--------------+---------------+--------------+----------+--------------+
  6. Complete the following configuration on SLX devices:
    efa policy qos map create --type dscp-tc --name dscp2tc --rule "dscp[1],tc[1],dp[1]"
    efa policy qos map create --type pcp-tc --name pcp2tc --rule "pcp[2],tc[5],dp[2]"
    efa policy qos map create --type tc-dscp --name tc2dscp --rule "tc[4],dp[2],dscp[44]"
    efa policy qos map create --type tc-pcp --name tc2pcp --rule "tc[3],dp[1],pcp[3]"
    efa policy qos profile create --name qosProfile1 --rule --dscp-tc[dscp2tc] --tc-dscp[tc2dscp]  --pcp-tc[pcp2tc] --tc-pcp[tc2pcp] --trust[dscp]
    efa policy qos profile bind --profile qosProfile1 --fabric fabric1
    The following example describes how an SLX configuration is applied on devices for QoS profile:
    1. The required QoS maps are created on the fabric devices.
      On devices of fabric1
      qos map traffic-class-dscp tc2Dscp
      map traffic-class 4 drop-precedence 2 to dscp 44
      !
       
      qos map dscp-traffic-class dscp2tc
      map dscp 1 to traffic-class 1 drop-precedence 1
      !
      On devices of fabric2
      SLX# show running-config qos
      qos map cos-traffic-class pcp2tc
      map cos 2 to traffic-class 5 drop-precedence 2
      !
      qos map traffic-class-cos tc2pcp
      map traffic-class 3 drop-precedence 1 to cos 3
      !
    2. The trust dscp configuration is applied to all the L2 interfaces.
      L2 interface in access mode
      SLX# show running-config interface Ethernet 0/27
      interface Ethernet 0/27
      switchport
      switchport mode access
      switchport access vlan 1
      qos trust dscp
      no shutdown
      !
      L2 interface in trunk mode
      interface Ethernet 0/25
      switchport
      switchport mode trunk
      switchport trunk tag native-vlan
      qos trust dscp
      no shutdown
      !
    3. PCP to TC and TC to PCP maps are applied on all L2 interfaces in trunk mode.
      interface Ethernet 0/25
      switchport
      switchport mode trunk
      switchport trunk tag native-vlan
      qos trust dscp
      qos traffic-class-cos tc2pcp
      qos cos-traffic-class pcp2tc
      no shutdown
      !
      When you set the trust to auto in the profile, the configuration is as follows.
      interface Ethernet 0/25
      switchport
      switchport mode trunk
      switchport trunk tag native-vlan
      qos traffic-class-cos tc2pcp
      qos cos-traffic-class pcp2tc
      no shutdown
      !
    4. DSCP to TC is applied to all the L3 interfaces and L2 interfaces if qos trust is set to DSCP.
      • L2 interface in trunk mode
        interface Ethernet 0/25
        switchport
        switchport mode trunk
        switchport trunk tag native-vlan
        qos trust dscp
        qos traffic-class-cos tc2pcp
        qos cos-traffic-class pcp2tc
        qos dscp-traffic-class dscp2tc
        no shutdown
        !
      • L2 interface in access mode
        interface Ethernet 0/27
        switchport
        switchport mode access
        switchport access vlan 1
        qos trust dscp
        qos dscp-traffic-class dscp2tc
        no shutdown
        !
      • L3 interface
        interface Ethernet 0/26
        qos dscp-traffic-class dscp2tc
        no shutdown
        !
    5. TC to DSCP maps are applied to all the L3 interfaces and L2 interfaces irrespective of qos trust dscp setting.
      • L2 interface in trunk mode
        interface Ethernet 0/25
        switchport
        switchport mode trunk
        switchport trunk tag native-vlan
        qos trust dscp
        qos traffic-class-cos tc2pcp
        qos cos-traffic-class pcp2tc
        qos traffic-class-dscp tc2Dscp
        qos dscp-traffic-class dscp2tc
        qos remark dscp
        no shutdown
        !
      • L2 interface in access mode (trust enabled)
        interface Ethernet 0/27
        switchport
        switchport mode access
        switchport access vlan 1
        qos trust dscp
        qos traffic-class-dscp tc2Dscp
        qos dscp-traffic-class dscp2tc
        qos remark dscp
        no shutdown
        !
      • L2 interface in access mode (trust not enabled)
        interface Ethernet 0/28
        switchport
        switchport mode access
        switchport access vlan 1
        qos traffic-class-dscp tc2Dscp
        qos remark dscp
        no shutdown
        !
      • L3 interface
        interface Ethernet 0/26
        qos traffic-class-dscp tc2Dscp
        qos dscp-traffic-class dscp2tc
        no shutdown
        !